package top.sssd.auth.model.permission.converter;

import java.time.LocalDateTime;

import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import top.sssd.auth.model.permission.dto.PermissionDto;
import top.sssd.auth.model.permission.entity.Permission;
import top.sssd.auth.model.permission.request.PermissionSaveOrUpdateReq;
import top.sssd.auth.model.permission.response.PermissionResp;


/**
 * @author sssd
 * @description 权限表 Converter转换类
 * @create ${time.now}
 * @version: 1.0.0-SNAPSHOT
 */
@Mapper
public interface PermissionConverter {

    PermissionConverter INSTANCE = Mappers.getMapper(PermissionConverter.class);

    PermissionResp entityToResp(Permission permission);

    Permission saveOrUpdatePermissionReqToEntity(PermissionSaveOrUpdateReq permissionSaveOrUpdateReq);

    Permission dtoToEntity(PermissionDto permissionDto);

    PermissionDto entityToDto(Permission permission);

}

